﻿using System;
using System.Collections.Generic;

namespace Battle.View
{
    public class BattlePos
    {
        public const int ROW_MAX = 3;
        public const int COL_MAX = 5;

        int col;
        int row;
        public int FPId;
        public BattleCamp camp;

        public BattlePos(int FPId, BattleCamp camp)
        {
            this.camp = camp;
            SetFPId(FPId);
        }

        public void SetFPId(int FPId)
        {
            this.FPId = FPId;
            this.row = (this.FPId - 1) / COL_MAX + 1;
            this.col = this.FPId - (row - 1) * COL_MAX;
        }

        public int GetCol()
        {
            return col;
        }

        public int GetRow()
        {
            return row;
        }
    }
}
